<?php
/**
 * Created by PhpStorm.
 * User: Larry
 * Date: 16/6/28
 * Time: 13:52
 */

const NAMESPACE_ADMIN      = '\App\Http\Controllers\Admin\\';
const SESSION_ADMIN        = 'admin';
const SESSION_ADMIN_USER   = 'admins_user';

$admin = array(
    'prefix'=>'center',
    'namespace'=>'Admin',
    'middleware'=>['web','checkAdminlogin']
);

//生成验证码�
Route::get('captcha', function()
{
    return generate_captcha();
});
// 后台不需要登录验证的接口
Route::get('center', 'Admin\LoginController@getLogin');
Route::get('center/login', 'Admin\LoginController@getLogin');
Route::post('center/login', 'Admin\LoginController@postLogin');
Route::get('center/logout', 'Admin\LoginController@getLogout');

Route::group($admin, function(){
    /**
     * 隐式控制器路由组
     */
    Route::controllers([
        'admin' => 'AdminController',
        'group' => 'GroupController',
        'card' => 'CardController',
        'log' => 'CardLogController',
        'wechat' => 'WechatController',
        'log' => 'CardLogController',
        'sysconfig' => 'SysConfigController',
        'setting' => 'SettingController',
        'member' => 'MemberController',
        'index' => 'IndexController',
        'node' => 'NodeController',
        'role' => 'RoleController',
    ]);


});